package com.example.human_resource_management.service;

import com.example.human_resource_management.common.ResponseData;
import com.example.human_resource_management.entry.dto.AttendanceEmployeeDto;
import com.example.human_resource_management.entry.po.Attendance;
import com.baomidou.mybatisplus.extension.service.IService;

import java.sql.Date;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
* @author Lenovo
* @description 针对表【attendance(考勤记录表)】的数据库操作Service
* @createDate 2025-06-09 11:48:49
*/
public interface AttendanceService extends IService<Attendance> {


    List<Attendance> getAttenById(Long empId);
    ResponseData<String> addAttendanceRecord(LocalDateTime punchTime);

    //管理员端
    // 联查考勤和员工信息
    List<AttendanceEmployeeDto> selectAttendanceEmployeeList();

    // 按ID联查考勤和员工信息
    AttendanceEmployeeDto selectAttendanceEmployeeById(Long recordId);

    // 按日期查询考勤记录
    List<AttendanceEmployeeDto> selectAttendanceByDate(LocalDate date);

    // 新增考勤记录
    boolean addAttendance(Attendance attendance);

    // 修改考勤记录
    boolean updateAttendance(Attendance attendance);

    // 删除考勤记录
    boolean deleteAttendance(Long recordId);
}
